﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Root.master" AutoEventWireup="true" CodeFile="right.aspx.cs" Inherits="Default2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="Server">
    <div class="pageLabel">
        <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="Установка прав доступа" Font-Size="Medium" Theme="iOS">
        </dx:ASPxLabel>
    </div>
    <div style="margin-right: 10px; margin-left: 10px">
        <dx:ASPxComboBox ID="cbb_role" runat="server" AutoPostBack="True"
            DataSourceID="ds_workstate" TextField="NAME" ValueField="CODE" Width="180px"
            OnSelectedIndexChanged="cbb_role_SelectedIndexChanged">
        </dx:ASPxComboBox>
    </div>
    <p></p>
    <div style="margin-right: 10px; margin-left: 10px">
        <dx:ASPxTreeList ID="TreeList" runat="server" AutoGenerateColumns="False"
            KeyFieldName="ID" ParentFieldName="PARENTID" PreviewFieldName="TEXT" DataSourceID="ds_menu" OnSelectionChanged="TreeList_SelectionChanged">
            <Columns>
                <dx:TreeListTextColumn FieldName="ID" VisibleIndex="0" ReadOnly="True" Visible="False">
                </dx:TreeListTextColumn>
                <dx:TreeListTextColumn FieldName="PARENTID" VisibleIndex="1" ReadOnly="True" Visible="False">
                </dx:TreeListTextColumn>
                <dx:TreeListTextColumn FieldName="TEXT" VisibleIndex="2" ReadOnly="True">
                </dx:TreeListTextColumn>
            </Columns>
            <Settings ShowColumnHeaders="False" />
            <SettingsBehavior AutoExpandAllNodes="True" ProcessSelectionChangedOnServer="True" />
            <SettingsSelection Enabled="True" Recursive="True" AllowSelectAll="True" />
            <ClientSideEvents SelectionChanged="function(s, e) {cbPanel.PerformCallback('clear');}" />
        </dx:ASPxTreeList>
        <p></p>
        <dx:ASPxCallbackPanel ID="cbPanel" runat="server" Width="200px" OnCallback="cbPanel_Callback" ClientInstanceName="cbPanel">
            <PanelCollection>
                <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                    <dx:ASPxLabel ID="lbl_info" runat="server" Text="">
                    </dx:ASPxLabel>
                    <dx:ASPxButton ID="bt_save" runat="server" AutoPostBack="False" Enabled="false"
                        OnClick="bt_save_Click" Text="Сохранить" Width="180px">
                        <ClientSideEvents Click="function(s, e) { cbPanel.PerformCallback('saved');}" />
                    </dx:ASPxButton>
                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxCallbackPanel>
    </div>
    <asp:EntityDataSource ID="ds_menu" runat="server" ConnectionString="name=RegistRar" DefaultContainerName="RegistRar" EnableFlattening="False" EntitySetName="MENU" Select="it.[ID], it.[PARENTID], it.[TEXT]">
    </asp:EntityDataSource>
    <asp:EntityDataSource ID="ds_workstate" runat="server" ConnectionString="name=RegistRar" DefaultContainerName="RegistRar" EnableFlattening="False" EntitySetName="WORKERSTATE">
    </asp:EntityDataSource>
</asp:Content>

